<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="<?php echo __PUBLIC__?>/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="<?php echo __PUBLIC__?>/Admin/Flat/img/favicon.ico">

		<link rel="stylesheet" href="<?php echo __PUBLIC__?>/hdjs/hdjs.css">
	    <script type="text/javascript" src="<?php echo __PUBLIC__?>/jquery-1.7.2.min.js"></script>
	    <script type="text/javascript" src="<?php echo __PUBLIC__?>/hdjs/hdjs.min.js"></script>
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	</head>
	<body>
	<!-- ajax提交  弹窗提示   注意<?php echo U?>的引号 -->
 	<form action="" method="post" onsubmit="return hd_submit(this,'<?php echo U('category/edit')?>','<?php echo U('category/index')?>')">
		<div class="alert alert-success">添加分类</div>
		<div class="form-group">
			<label for="exampleInputEmail1">分类名称</label>
			<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入分类名称" required="" name="cname" value="<?php echo $array['cname']?>">
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">所属分类</label>
			<select name="pid" class="form-control">
			<?php foreach ($result as $k=>$v){?>
				<option value="<?php echo $v['cid']?>" <?php if($v['cid']==$array['pid']){?>
                selected
               <?php }?>><?php echo $v['_name']?></option>
			<?php }?>
			</select>
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">分类标题</label>
			<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入分类标题" required="" name="ctitle" value="<?php echo $array['ctitle']?>">
		</div>
		<!-- <div class="form-group">
			<label for="exampleInputEmail1">分类关键字</label>
			<textarea name="" rows="5" cols=""  class="form-control" placeholder="请输入分类关键字"></textarea>
		</div> -->
		<div class="form-group">
			<label for="exampleInputEmail1">分类描述</label>
			<textarea name="cdes" rows="5" cols=""  class="form-control" placeholder="请输入分类描述"><?php echo $array['cdes']?></textarea>
		</div>
		<div class="form-group">
			<label for="exampleInputEmail1">分类排序</label>
			<input id="exampleInputEmail1" class="form-control" type="text" placeholder="请输入分类排序" required="" name="csort" value="<?php echo $array['csort']?>">
		</div>
		<input type="hidden" name="cid" value="<?php echo $_GET['cid']?>">
	
		<button class="btn btn-primary btn-block" type="submit"> 确定 </button>
	<input type='hidden' name='__TOKEN__' value='74e828934d78bda2ea24a00e57387ee1'</form>
	</body>
</html>
